VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Frm_TestItem 
   Caption         =   "Test Item"
   ClientHeight    =   6825
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9510
   OleObjectBlob   =   "Frm_TestItem.frx":0000
   StartUpPosition =   2  'CenterScreen
End
Attribute VB_Name = "Frm_TestItem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CheckBox_All_Click()
If CheckBox_All.Value = True Then
   For i = 0 To ItemNum - 1
   Item_ListBox.SELected(i) = True
   Next i
Else
   For i = 0 To ItemNum - 1
   Item_ListBox.SELected(i) = False
   Next i
End If
End Sub
Private Sub Cmd_TestItemOK_Click()
Dim SearchTime As Integer
SearchTime = 1

For i = 0 To ItemNum - 1
'--------to get searchtime----
If i > 0 Then
    If Item_ListBox.list(i) = Item_ListBox.list(i - 1) Then
        SearchTime = SearchTime + 1
    Else
        SearchTime = 1
    End If
End If
'------------------------------
If Item_ListBox.SELected(i) = False Then
   DevConf(MatchNum(DevConf, Item_ListBox.list(i), SearchTime)).ToBeTested = False
   Else
   DevConf(MatchNum(DevConf, Item_ListBox.list(i), SearchTime)).ToBeTested = True
End If
Next i
'For k = 0 To ItemNum - 1
 '   MsgBox DevConf(k).ItemName & " " & DevConf(k).ToBeTested
'Next k
Unload Frm_TestItem
End Sub
Private Sub UserForm_Initialize()
'add items to the list
Dim pos As Integer
Item_ListBox.AddItem DevConf(0).ItemName
'Item_ListBox.AddItem "feel", 0
For i = 1 To ItemNum - 1
pos = 0
   For k = 0 To i - 1
        If DevConf(i).ItemName > Item_ListBox.list(k) Then
           pos = k + 1
        End If
    Next k
Item_ListBox.AddItem DevConf(i).ItemName, pos
Next i
For j = 0 To ItemNum - 1
    Item_ListBox.SELected(j) = True
Next j

CheckBox_All.Value = 1
End Sub
